<?php

namespace App\Http\Requests\Api\User;

use App\Http\Requests\Api\BaseRequest;

class UpdatePswdRequest extends BaseRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'password'=>'required|confirmed|max:16|min:3',
            'verify_str'=>'required',
            'password_confirmation'=>'required|max:16|min:3',
        ];
    }

    public function attributes()
    {
        return [
          'password'=>'密码',
          'verify_str'=>'验证安全码',
          'password_confirmation'=>'确认密码'
        ];
    }

    public function messages()
    {
        return [
            'password.confirmed'=>'2次密码不一致'
        ];
    }
}
